package com.juyu.miliao.api.domain;

import java.time.LocalDateTime;

import javax.validation.constraints.Min;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonView;
import com.juyu.miliao.api.util.JacksonView;
import com.juyu.miliao.api.validator.GiftSpendCheck;

/**
 * 礼物来往
 * @author wbf
 */
public class GiftSpend {
	
	/** 礼物往来id*/

	private int spendId;
	/** 礼物id*/
	@Min(value = 1, groups = {GiftSpendCheck.class})
	@JsonView(JacksonView.GiftSpend.class)
	private int giftId;
	/** 接收礼物用户id*/
	@Min(value = 1, groups = {GiftSpendCheck.class})
	private int inUserId;
	/** 送出礼物用户id*/
	@Min(value = 1, groups = {GiftSpendCheck.class})
	private int outUserId;
	/** 费用（单位：金币）*/
	private int spend;
	/** 钻石(单位：钻石)*/
	@JsonView(JacksonView.GiftSpend.class) 
	private double diamond;
	/** 数量*/
	@Min(value = 1, groups = {GiftSpendCheck.class})
	@JsonView(JacksonView.GiftSpend.class) 
	private int num;
	/** 创建时间*/
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
	private LocalDateTime createTime;
	
	/**vo使用 礼物*/
	@JsonView(JacksonView.GiftSpend.class) 
	private String giftName;
	@JsonView(JacksonView.GiftSpend.class) 
	private String icon;
	
	public String getGiftName() {
		return giftName;
	}
	public void setGiftName(String giftName) {
		this.giftName = giftName;
	}
	public String getIcon() {
		return icon;
	}
	public void setIcon(String icon) {
		this.icon = icon;
	}
	public int getNum() {
		return num;
	}
	public void setNum(int num) {
		this.num = num;
	}
	public int getSpendId() {
		return spendId;
	}
	public void setSpendId(int spendId) {
		this.spendId = spendId;
	}
	public int getGiftId() {
		return giftId;
	}
	public void setGiftId(int giftId) {
		this.giftId = giftId;
	}
	public int getInUserId() {
		return inUserId;
	}
	public void setInUserId(int inUserId) {
		this.inUserId = inUserId;
	}
	public int getOutUserId() {
		return outUserId;
	}
	public void setOutUserId(int outUserId) {
		this.outUserId = outUserId;
	}
	public int getSpend() {
		return spend;
	}
	public void setSpend(int spend) {
		this.spend = spend;
	}
	public double getDiamond() {
		return diamond;
	}
	public void setDiamond(double diamond) {
		this.diamond = diamond;
	}
	public LocalDateTime getCreateTime() {
		return createTime;
	}
	public void setCreateTime(LocalDateTime createTime) {
		this.createTime = createTime;
	}
}
